<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
{insert name="module_cssjs" css="core.css" js="jquery.min.js"}
</head>
{literal}
<script type="text/javascript">
$(document).ready(function() {
	
$('[name="form"]').submit(function() {
	var password = $('input[name="password"]').val();
	if(!password) {
		alert('请输入原密码'); return false;
	}
	var password1 = $('input[name="password1"]').val();
	if(!password1) {
		alert('请输入新密码'); return false;
	}
	var password2 = $('input[name="password2"]').val();
	if(!password2) {
		alert('请重复输入密码'); return false;
	}
	if(password1 != password2) {
		alert('两次密码输入不一致'); return false;
	}
	var params = $('[name="form"]').serialize();
	$.post('/profile/password.json', params, function(dt) {
		if(dt.status) {
			alert(dt.message);
		} else {
			alert('修改密码成功');
			window.location.href = '/main';
		}
	}, 'json');
	return false;
});

})
</script>
{/literal}
<body>
<h3 class="label">
	<strong class="on"><span>修改密码</span></strong>
	<span class="refresh"><a href="javascript:void(0);" onclick="refresh();">刷新</a></span>
</h3>
<div class="table">
	<form name="form" action="post">
	<table class="TB-form">
		<tr>
			<td width="76">原&nbsp;密&nbsp;码：</td>
			<td width="1200"><input class="input" name="password" autoComplete="off" type="password" /></td>
		</tr>
		<tr>
			<td>新&nbsp;密&nbsp;码：</td>
			<td><input class="input" name="password1" autoComplete="off" type="password" /></td>
		</tr>
		<tr>
			<td>重复密码：</td>
			<td><input class="input" name="password2" autoComplete="off" type="password" /></td>
		</tr>
	</table>
	<div class="btn-box">
		<span class="btn-indent"><input class="btn" type="submit" value="保&nbsp;&nbsp;存" /></span>
		<span class="btn-indent"><input class="btn" type="reset" value="重&nbsp;&nbsp;置" /></span>
	</div>
	</form>
</div>

</body>
</html>